<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> UDT Reference</title>
<link rel="stylesheet" href="udtdoc.css" type="text/css" />
</head>

<body>
<div class="ref_head">&nbsp;UDT Reference: Functions</div>

<h4 class="func_name"><strong>cleanup</strong></h4>
<p>The <b>cleanup</b> method releases the UDT library from your application.</p>

<div class="code">int cleanup(<br />
);</div>

<h5>Parameters</h5>
<dl>
  <dt><i>None.</i></dt>
</dl>

<h5>Return Value</h5>
<p>If success, 0 is returned; otherwise, UDT::ERROR is returned and specific error information can be retrieved by <a href="error.htm">getlasterror</a>. </p>
<p>In the current version, this method always succeed. </p>
<h5>Description</h5>
<p>The <strong>cleanup</strong> method releases the UDT library. All the remaining open connections will be closed. The background garbage collection is closed. However, this method will do nothing if no <a href="startup.htm"><strong>startup</strong></a> was ever called, or this is a repeated <strong>cleanup</strong> call. </p>
<p>The method must be called before the application exits, or before the UDT DLL is released, otherwise memory leak could happen. </p>
<h5>See Also</h5>
<p><strong><a href="startup.htm">startup</a></strong></p>
<p>&nbsp;</p>

</body>
</html>
